#ifndef ZIGBEE_H
#define ZIGBEE_H

#include "main.h"

//#define ZIGBEE_WAKEUP_PORT  gpioPortD
//#define ZIGBEE_WAKEUP_PIN   0

#define ZIGBEE_WAKEUP_PORT  gpioPortE
#define ZIGBEE_WAKEUP_PIN   12

#define ZIGBEE_WAKEUP_PIN_WRITE(value) (value > 0)?GPIO_PinOutSet(ZIGBEE_WAKEUP_PORT, ZIGBEE_WAKEUP_PIN):GPIO_PinOutClear(ZIGBEE_WAKEUP_PORT, ZIGBEE_WAKEUP_PIN)

void zigbee_init(void);
void send_zigbee_info(uint8_t *buf, uint8_t length);
void set_cooaddr(uint8_t *cooaddr);
void zigbee_module_wakeup(void);
void zigbee_module_sleep(void);
void zigbee_module_reset(void);
void zigbee_module_init(void);

#endif
